Source : https://buttondown.email/hillelwayne/archive/jewmain-driven-design/

Oct. 4, 2021, 6:09 p.m.

Jewmain Driven Design

Computer Things

Sup nerds, I’m back from Strange Loop! I have a million ideas I want to write about now, but I’ll stick to one of the lighter, sillier ones. Based on a claim by (I think) Jess Kerr, who said something like “In domain-driven design, you’re supposed to start with concrete examples, because those flush out the edge cases of your problem domain.”

And you know what’s the best edge case?

Jews.

I realize a few of you might not have 10+ years of Judaic schooling so here’s the Rashi notes: Judaism appeared in Israel roughly 2500 years ago and has a large set of religious commandments— the usually given number is 613. These commandments are all fixed in a single, unchanging holy text, the Torah. As people ran into edge cases in the real world, religious leaders (first the Kohanim, latter the Rabbis)1 had to figure out what people should do. For example:

  • “Don’t boil a lamb in its mother’s milk.”
  • Okay, but most of us don’t know the provenance of our milk or meat. Can you be sure that you’re not doing this by accident?
  • Better ban any mixing of milk and meat whatsoever.
  • But what about birds? You can’t boil chicken in its mother’s milk because chickens don’t have milk.
  • Well some Rabbis think it’s okay, arguing that the Torah uses different criteria to determine the kosherness (edibility status) of birds vs animals, so they should obey different rules.
  • But other Rabbis argue that the ritualistic butchering process for the two is the same and the postprocessing is identical, so they should be treated the same in terms of “food-nature”, and we’ve already ruled that milk and meat can’t be combined, so neither can milk and poultry.
  • Oh shit we need a comprehensive classification of what counts as milk and what as meat. Are eggs meat? Is cheese dairy? What about American Cheese Product?

Then someone points out it was likely a mistranslation but that doesn’t matter, because while the Torah is a fixed document, Judaism is explicitly a living religion, so if the Rabbis decreed something as forbidden it’s forbidden.

Repeat for 2500 years and you get a complex set of religious requirements that will almost certainly play hell with your problem domain if you try to accommodate your Orthodox users. Here’s just a few off the top of my head:

  • Textile inventory. Jews can’t wear clothing that has both linen and wool in it.
  • My oven has a safety limit. it can’t stay on for more than 12 hours. It also has a “religious override”, because on the Jewish calendar there are five 48-hour intervals where you can’t turn the oven on or off, but can take food in and out.
  • Holiday tracking! Christmas is one day. Thanksgiving is two days. Passover is eight days, unless your users are in Israel, in which case it’s seven days.
  • Also, holidays go sundown to sundown. Shabbos this week starts at 6:00 PM in Chicago and 6:14 PM in St. Louis.
  • Catering system. Requirements like “allergies” and “gluten-free” depend entirely on the ingredients used. Requirements like “vegetarian” are a little more complex. “Kosher”, among many other requirements, depends not just on the ingredients of the dish but what other dishes are served in the meal.
    • And the oven you prepped the food in.
    • And the cutlery you used.
    • And whether it’s Passover.

This is just a sample of the fractal complexity of making your app Jew-proof. I imagine most people won’t have to deal with this, because Orthodox Jews tend to be pretty understanding of just how goddamn hard it is for goyim to track this all. It’s fine if your calendar app just says Passover is eight days for everybody, plus maybe an extra “first night of passover” pseudo holiday in the beginning.

But it does make for great examples! I’m always looking for real world examples for my teaching, something that has weight and complexity without feeling artificial. And I’m really liking the idea. More Jewproofing exercises!

A slightly less bad alternative

I’m guessing that many of you are really fucking uncomfortable with this. This is deeply-held beliefs of millions of people. Turning that into “a programming exercise” is a pretty egregious case of cultural appropriation.

(I can get away with it because I was Orthodox for 18 years. And I once dropped a Sefer Torah.)

I still like the idea of extracting complex edge cases from idiosyncratic cultural groups. Something where everybody needs one thing, but that group needs something else. We need to pick “looser” groups which aren’t so tied to people’s identity. So maybe:

  • Left-handed people
  • Freemasons?!
  • Yeah probably Freemasons

It’s harder to think of groups besides Jews, because Judaism has a rich history of edge cases to draw on (and also I’m Jewish). So it inspired the actual idea, even if reasonable implementations can’t ever use them. That’s kinda neat.


  1. Kohanim are the “priest caste” in Judaism and were the arbiters of spiritual matters. After the destruction of the second temple in 70 CE, authority gradually shifted over to the scholar class, the Rabbis. 

(+)